"""
_*_ : utf-8 _*_ 
@Time: 2023/10/29 21:12
@Author: LWK
@File: 025_流程控制语句
@Project: demo01
"""
if True:
    print('我对了')

age = 16

if age >= 18:
    print('成年了')
else:
    print('未成年')
    if age == 17:
        print('明年才成年')
    else:
        print('明年还是未成年')

age_input = int(input('请输入年龄：'))
if age_input >= 18:
    print('输入的年龄未成年')
elif age_input == 17:
    print('明年才行')
else:
    print('成年了')

a = 10
while a > 0:
    print('while循环：%d' % a)
    a -= 1

s = 'hello'
for char in s:
    print(char)

# range(5)==range(0, 5) [0,5) 左边右开
# range(1, 10, 3) 表示 【1， 10）中的 1，,4，7。 参数3表示步长，即从1开始，连续加3的值
print(range(5))
print(range(0, 5))
print(range(5) == range(0, 5))

for i in range(5):
    print(i)

for i in range(1, 10, 3):
    print(i)

singer_list = ['Jay', 'Vae']
for singer in singer_list:
    print(singer)

for index in range(len(singer_list)):
    print(singer_list[index])
